import service from "@/api/index.js";
import qs from 'qs';
import {createRouterMatcher as Promise} from "vue-router";
const OrderApi= {
    //验证码
    insert(orderVo){
        return service.post("/order",orderVo);
    },
    selectById(orderId) {
        return service.get(`/order/${orderId}`);
    },
    pay(orderVo){
        return service.post('/order/pay',orderVo);
    },
    selectByUser(pageNum,pageSize) {
        return service.get("/order/user",{
            params: {
                pageNum,
                pageSize
            }
        });
    },
    selectByUserAll(pageNum,pageSize) {
        return service.get("/order/All",{
            params: {
                pageNum,
                pageSize
            }
        });
    },
    update(id){
        return service.put(`/order/${id}`)
    }
};
export default OrderApi